#include <exception>
#include <iostream>

#include "Args.h"
#include "MyInitial.h"
#include "MyRunTest.h"
#include "TestDoseStat.h"
#include "TestDoseStatCuda.h"

static int RunTest(int argc, char** argv)
{
    do
    {
        ///===================================================== test func: dose statistics
        if (args()->IsRunTe_DoseStat())
        {
            const auto ds = args()->GetTe_DoseStat();
            MYINFO("Run test: dose statistics; file path {}, volumes array -> {}, doses array ->: {}\n", ds.filePath, ds.volumeName, ds.doseName);
            runTest(testdosestat::tt);

            (runTest(testdosestatcuda::tt));

            (runTest(testdosestatcuda::tt_profile));

            break;
        }

    } while (0);

    return 0;
}

int main(int argc, char** argv)
{
    ///===================================================== 初始化日志系统
    Logger::init();
    ///===================================================== Args单例, 解析命令行参数
    args()->Parse(argc, argv);

    std::ignore = RunTest(argc, argv);

    return 0;
}